package com.marvels.dubbo.externalservice.controller;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import com.fintech.third.model.ZxDataReqDTO;
import com.fintech.third.model.ZxDataRespDTO;
import com.fintech.third.model.intbank.IntBankBanruDetail;
import com.fintech.third.model.intbank.IntBankBasiInfoCollection;
import com.fintech.third.model.intbank.IntBankBasic;
import com.fintech.third.model.intbank.IntBankCreditCard;
import com.fintech.third.model.intbank.IntBankCreditPaymentRecords;
import com.fintech.third.model.intbank.IntBankCredittips;
import com.fintech.third.model.intbank.IntBankDwellmessage;
import com.fintech.third.model.intbank.IntBankEndowmentInsurance;
import com.fintech.third.model.intbank.IntBankGuaranteeCount;
import com.fintech.third.model.intbank.IntBankLog;
import com.fintech.third.model.intbank.IntBankNotCredittips;
import com.fintech.third.model.intbank.IntBankNotPinshouseholds;
import com.fintech.third.model.intbank.IntBankNotQuasiCredit;
import com.fintech.third.model.intbank.IntBankPositionmesage;
import com.fintech.third.model.intbank.IntBankQueryDetail;
import com.fintech.third.model.intbank.IntBankQuerySummary;
import com.fintech.third.model.intbank.IntBankStandardCreditCard;
import com.fintech.third.model.intlog.IntDataQueryLog;
import com.marvels.common.dto.MarvelsResultDTO;
import com.marvels.common.exception.MarvelsBusinessException;
import com.marvels.common.exception.MarvelsErrorCode;
import com.marvels.common.utils.MarvelsLogUtil;
import com.marvels.dubbo.externalservice.service.IntBankDataService;

@RequestMapping("dubbo/external/intBank/api")
@RestController
public class DubboIntBankController {

	@Autowired
	private IntBankDataService intBankDataService;

	@RequestMapping("detailsOfLoanInformation")
	@ResponseBody
	public List<Map<String, Object>> detailsOfLoanInformation(@RequestBody Map<String, String> map) {
		return intBankDataService.detailsOfLoanInformation(map);

	}

	@RequestMapping("viewRiskInfoPositionData")
	@ResponseBody
	public Map<String, Object> viewRiskInfoPositionData(@RequestBody Map<String, String> map) {
		return intBankDataService.viewRiskInfoPositionData(map);

	}

	// @RequestMapping("intBankCreditCardLoanId")
	// @ResponseBody
	// public List<IntBankCreditCard> intBankCreditCardLoanId(@RequestBody
	// Map<String, String> map) {
	// return intBankDataService.intBankCreditCardLoanId(map);
	// }

	/**
	 * 贷款记录
	 * 
	 * @param map
	 * @return
	 */
	@RequestMapping("intBankCreditPaymentRecords")
	@ResponseBody
	public Map<String, Object> intBankCreditPaymentRecords(@RequestBody Map<String, String> map) {
		return intBankDataService.intBankCreditPaymentRecords(map);

	}

	/**
	 * 贷记卡信息
	 * 
	 * @param map
	 * @return
	 */
	@RequestMapping("intBankCreditCard")
	@ResponseBody
	public Map<String, Object> intBankCreditCard(@RequestBody Map<String, String> map) {
		return intBankDataService.intBankCreditCard(map);

	}

	/**
	 * 准贷记卡数据
	 * 
	 * @param map
	 * @return
	 */
	@RequestMapping("intBankStandardCreditCard")
	@ResponseBody
	public List<IntBankStandardCreditCard> intBankStandardCreditCard(@RequestBody Map<String, String> map) {
		return intBankDataService.intBankStandardCreditCard(map);

	}

	/**
	 * 公共信息明细
	 * 
	 * @param map
	 * @return
	 */
	@RequestMapping("intBankEndowmentInsurance")
	@ResponseBody
	public List<IntBankEndowmentInsurance> intBankEndowmentInsurance(@RequestBody Map<String, String> map) {
		return intBankDataService.intBankEndowmentInsurance(map);

	}

	/**
	 * 信息摘要部分
	 * 
	 * @param map
	 * @return
	 */
	@RequestMapping("summaryInformationData")
	@ResponseBody
	public Map<String, Object> summaryInformationData(@RequestBody Map<String, String> map) {
		return intBankDataService.summaryInformationData(map);

	}

	/**
	 * 信息摘要5部分
	 * 
	 * @param map
	 * @return
	 */
	@RequestMapping("intBankGuaranteeCount")
	@ResponseBody
	public List<IntBankGuaranteeCount> intBankGuaranteeCount(@RequestBody Map<String, String> map) {
		return intBankDataService.intBankGuaranteeCount(map);

	}

	/**
	 * 添加准贷记卡信息详细
	 * 
	 * @param intBankStandardCreditCard
	 * @return
	 */
	@RequestMapping("saveIntBankStandardCreditCard")
	@ResponseBody
	public int saveIntBankStandardCreditCard(@RequestBody IntBankStandardCreditCard intBankStandardCreditCard) {
		return intBankDataService.saveIntBankStandardCreditCard(intBankStandardCreditCard);

	}

	/**
	 * 添加 养老保险金数据
	 * 
	 * @param intBankStandardCreditCard
	 * @return
	 */
	@RequestMapping("saveIntBankEndowmentInsurance")
	@ResponseBody
	public int saveIntBankEndowmentInsurance(@RequestBody IntBankEndowmentInsurance intBankEndowmentInsurance) {
		return intBankDataService.saveIntBankEndowmentInsurance(intBankEndowmentInsurance);

	}

	/**
	 * 更新养老保险金数据
	 * 
	 * @param intBankEndowmentInsurance
	 * @return
	 */
	@RequestMapping("updateIntBankEndowmentInsurance")
	@ResponseBody
	public int updateIntBankEndowmentInsurance(@RequestBody IntBankEndowmentInsurance intBankEndowmentInsurance) {
		return intBankDataService.updateIntBankEndowmentInsurance(intBankEndowmentInsurance);

	}

	/**
	 * 保存未销户准贷记卡信息
	 * 
	 * @param intBankNotQuasiCredit
	 * @return
	 */
	@RequestMapping("saveIntBankNotQuasiCredit")
	@ResponseBody
	public int saveIntBankNotQuasiCredit(@RequestBody IntBankNotQuasiCredit intBankNotQuasiCredit) {
		return intBankDataService.saveIntBankNotQuasiCredit(intBankNotQuasiCredit);

	}

	/**
	 * 更新未销户准贷记卡信息
	 * 
	 * @param intBankNotQuasiCredit
	 * @return
	 */
	@RequestMapping("updateIntBankNotQuasiCredit")
	@ResponseBody
	public int updateIntBankNotQuasiCredit(@RequestBody IntBankNotQuasiCredit intBankNotQuasiCredit) {
		return intBankDataService.updateIntBankNotQuasiCredit(intBankNotQuasiCredit);

	}

	/**
	 * 未结清贷款信息汇总更新
	 * 
	 * @param intBankEndowmentInsurance
	 * @return
	 */
	@RequestMapping("updateIntBankNotCredittips")
	@ResponseBody
	public int updateIntBankNotCredittips(@RequestBody IntBankNotCredittips intBankNotCredittips) {
		return intBankDataService.updateIntBankNotCredittips(intBankNotCredittips);

	}

	/**
	 * 未结清贷款信息汇总信息保存
	 * 
	 * @param intBankNotQuasiCredit
	 * @return
	 */
	@RequestMapping("saveIntBankNotCredittips")
	@ResponseBody
	public int saveIntBankNotCredittips(@RequestBody IntBankNotCredittips intBankNotCredittips) {
		return intBankDataService.saveIntBankNotCredittips(intBankNotCredittips);

	}

	/**
	 * 对外贷款担保信息汇总更新
	 * 
	 * @param intBankEndowmentInsurance
	 * @return
	 */
	@RequestMapping("updateIntBankGuaranteeCount")
	@ResponseBody
	public int updateIntBankGuaranteeCount(@RequestBody IntBankGuaranteeCount intBankGuaranteeCount) {
		return intBankDataService.updateIntBankGuaranteeCount(intBankGuaranteeCount);

	}

	/**
	 * 对外贷款担保信息汇总保存
	 * 
	 * @param intBankNotQuasiCredit
	 * @return
	 */
	@RequestMapping("saveIntBankGuaranteeCount")
	@ResponseBody
	public int saveIntBankGuaranteeCount(@RequestBody IntBankGuaranteeCount intBankGuaranteeCount) {
		return intBankDataService.saveIntBankGuaranteeCount(intBankGuaranteeCount);

	}

	/**
	 * 未销户贷记卡信息汇总更新
	 * 
	 * @param intBankEndowmentInsurance
	 * @return
	 */
	@RequestMapping("updateIntBankNotPinshouseholds")
	@ResponseBody
	public int updateIntBankNotPinshouseholds(@RequestBody IntBankNotPinshouseholds intBankNotPinshouseholds) {
		return intBankDataService.updateIntBankNotPinshouseholds(intBankNotPinshouseholds);

	}

	/**
	 * 未销户贷记卡信息汇总保存
	 * 
	 * @param intBankNotQuasiCredit
	 * @return
	 */
	@RequestMapping("saveIntBankNotPinshouseholds")
	@ResponseBody
	public int saveIntBankNotPinshouseholds(@RequestBody IntBankNotPinshouseholds intBankNotPinshouseholds) {
		return intBankDataService.saveIntBankNotPinshouseholds(intBankNotPinshouseholds);

	}

	/**
	 * 贷款信息明细保存
	 * 
	 * @param intBankCreditPaymentRecords
	 * @return
	 */
	@RequestMapping("saveIntBankCreditPaymentRecords")
	@ResponseBody
	public int saveIntBankCreditPaymentRecords(@RequestBody IntBankCreditPaymentRecords intBankCreditPaymentRecords) {
		return intBankDataService.saveIntBankCreditPaymentRecords(intBankCreditPaymentRecords);

	}

	/**
	 * 根据loanId查询贷记卡信息
	 * 
	 * @param map
	 * @return
	 */
	@RequestMapping("intBankCreditCardLoanId")
	@ResponseBody
	public List<IntBankCreditCard> intBankCreditCardLoanId(@RequestBody Map<String, String> map) {
		return intBankDataService.intBankCreditCardLoanId(map);

	}

	/**
	 * 贷记卡信息详细更新
	 * 
	 * @param intBankCreditPaymentRecords
	 * @return
	 */
	@RequestMapping("updateIntBankCreditCard")
	@ResponseBody
	public int updateIntBankCreditCard(@RequestBody IntBankCreditCard intBankCreditCard) {
		return intBankDataService.updateIntBankCreditCard(intBankCreditCard);

	}

	/**
	 * 贷记卡信息详细保存
	 * 
	 * @param intBankCreditPaymentRecords
	 * @return
	 */
	@RequestMapping("saveIntBankCreditCard")
	@ResponseBody
	public int saveIntBankCreditCard(@RequestBody IntBankCreditCard intBankCreditCard) {
		return intBankDataService.saveIntBankCreditCard(intBankCreditCard);

	}

	/**
	 * addQueryDetail位置的数据信息
	 * 
	 * @param map
	 * @return
	 */
	@RequestMapping("addQueryDetailPositionData")
	@ResponseBody
	public Map<String, Object> addQueryDetailPositionData(@RequestBody Map<String, String> map) {
		return intBankDataService.addQueryDetailPositionData(map);

	}

	/**
	 * 保存本人查询记录明细
	 * 
	 * @param map
	 * @return
	 */
	@RequestMapping("saveIntBankBanruDetail")
	@ResponseBody
	public int saveIntBankBanruDetail(@RequestBody IntBankBanruDetail intBankBanruDetail) {
		return intBankDataService.saveIntBankBanruDetail(intBankBanruDetail);

	}

	/**
	 * 保存本人查询记录明细
	 * 
	 * @param map
	 * @return
	 */
	@RequestMapping("updateIntBankBanruDetail")
	@ResponseBody
	public int updateIntBankBanruDetail(@RequestBody IntBankBanruDetail intBankBanruDetail) {
		return intBankDataService.updateIntBankBanruDetail(intBankBanruDetail);

	}

	/**
	 * 查询本人查询记录明细
	 * 
	 * @param map
	 * @return
	 */
	@RequestMapping("intBankBanruDetail")
	@ResponseBody
	public List<IntBankBanruDetail> intBankBanruDetail(@RequestBody Map<String, String> map) {
		return intBankDataService.intBankBanruDetail(map);

	}

	/**
	 * 删除查询记录汇总
	 * 
	 * @param id
	 * @return
	 */
	@RequestMapping("deleteIntBankQuerySummary")
	@ResponseBody
	public int deleteIntBankQuerySummary(long id) {
		return intBankDataService.deleteIntBankQuerySummary(id);

	}

	/**
	 * 保存记录汇总
	 * 
	 * @param id
	 * @return
	 */
	@RequestMapping("saveIntBankQuerySummary")
	@ResponseBody
	public int saveIntBankQuerySummary(@RequestBody IntBankQuerySummary intBankQuerySummary) {
		return intBankDataService.saveIntBankQuerySummary(intBankQuerySummary);

	}

	/**
	 * 更新记录汇总
	 * 
	 * @param id
	 * @return
	 */
	@RequestMapping("updateIntBankQuerySummary")
	@ResponseBody
	public int updateIntBankQuerySummary(@RequestBody IntBankQuerySummary intBankQuerySummary) {
		return intBankDataService.updateIntBankQuerySummary(intBankQuerySummary);

	}

	/**
	 * 删除本人查询记录明细
	 * 
	 * @param id
	 * @return
	 */
	@RequestMapping("deleteIntBankBanruDetail")
	@ResponseBody
	public int deleteIntBankBanruDetail(long id) {
		return intBankDataService.deleteIntBankBanruDetail(id);

	}

	/**
	 * 保存个人基本信息(银行征信数据)
	 * 
	 * @return
	 */
	@RequestMapping("saveIntBankBasic")
	@ResponseBody
	public int saveIntBankBasic(@RequestBody IntBankBasic intBankBasic) {
		return intBankDataService.saveIntBankBasic(intBankBasic);

	}

	/**
	 * 更新个人基本信息(银行征信数据)
	 * 
	 * @return
	 */
	@RequestMapping("updateIntBankBasic")
	@ResponseBody
	public int updateIntBankBasic(@RequestBody IntBankBasic intBankBasic) {
		return intBankDataService.updateIntBankBasic(intBankBasic);
	}

	/**
	 * 查询个人基本信息(银行征信数据)
	 * 
	 * @param map
	 * @return
	 */
	@RequestMapping("intBankBasic")
	@ResponseBody
	public List<IntBankBasic> intBankBasic(@RequestBody Map<String, String> map) {
		return intBankDataService.intBankBasic(map);

	}

	/**
	 * 保存信用提示
	 * 
	 * @return
	 */
	@RequestMapping("saveIntBankCredittips")
	@ResponseBody
	public int saveIntBankCredittips(@RequestBody IntBankCredittips intBankCredittips) {
		return intBankDataService.saveIntBankCredittips(intBankCredittips);

	}

	/**
	 * 更新信用提示
	 * 
	 * @return
	 */
	@RequestMapping("updateIntBankCredittips")
	@ResponseBody
	public int updateIntBankCredittips(@RequestBody IntBankCredittips intBankCredittips) {
		return intBankDataService.updateIntBankCredittips(intBankCredittips);

	}

	/**
	 * 查询信用提示
	 * 
	 * @param map
	 * @return
	 */
	@RequestMapping("intBankCredittips")
	@ResponseBody
	public List<IntBankCredittips> intBankCredittips(@RequestBody Map<String, String> map) {
		return intBankDataService.intBankCredittips(map);

	}

	/**
	 * 保存个人基本信息(职业信息)
	 * 
	 * @return
	 */
	@RequestMapping("saveIntBankPositionmesage")
	@ResponseBody
	public int saveIntBankPositionmesage(@RequestBody IntBankPositionmesage intBankPositionmesage) {
		return intBankDataService.saveIntBankPositionmesage(intBankPositionmesage);

	}

	/**
	 * 更新保存记录明细
	 * 
	 * @param intBankQueryDetail
	 * @return
	 */
	@RequestMapping("updateIntBankQueryDetail")
	@ResponseBody
	public int updateIntBankQueryDetail(@RequestBody IntBankQueryDetail intBankQueryDetail) {
		return intBankDataService.updateIntBankQueryDetail(intBankQueryDetail);

	}

	/**
	 * 更新个人基本信息(职业信息)
	 * 
	 * @return
	 */
	@RequestMapping("updateIntBankPositionmesage")
	@ResponseBody
	public int updateIntBankPositionmesage(@RequestBody IntBankPositionmesage intBankPositionmesage) {
		return intBankDataService.updateIntBankPositionmesage(intBankPositionmesage);

	}

	/**
	 * 查询个人基本信息(职业信息)
	 * 
	 * @param map
	 * @return
	 */
	@RequestMapping("intBankPositionmesage")
	@ResponseBody
	public List<IntBankPositionmesage> intBankPositionmesage(@RequestBody Map<String, String> map) {
		return intBankDataService.intBankPositionmesage(map);

	}

	/**
	 * 更新准贷记卡信息详细
	 * 
	 * @param intBankStandardCreditCard
	 * @return
	 */
	@RequestMapping("updateIntBankStandardCreditCard")
	@ResponseBody
	public int updateIntBankStandardCreditCard(@RequestBody IntBankStandardCreditCard intBankStandardCreditCard) {
		return intBankDataService.updateIntBankStandardCreditCard(intBankStandardCreditCard);

	}

	/**
	 * 保存居住信息
	 * 
	 * @return
	 */
	@RequestMapping("saveIntBankDwellmessage")
	@ResponseBody
	public int saveIntBankDwellmessage(@RequestBody IntBankDwellmessage intBankDwellmessage) {
		return intBankDataService.saveIntBankDwellmessage(intBankDwellmessage);

	}

	/**
	 * 更新居住信息
	 * 
	 * @return
	 */
	@RequestMapping("updateIntBankDwellmessage")
	@ResponseBody
	public int updateIntBankDwellmessage(@RequestBody IntBankDwellmessage intBankDwellmessage) {
		return intBankDataService.updateIntBankDwellmessage(intBankDwellmessage);

	}

	/**
	 * 查询居住信息
	 * 
	 * @param map
	 * @return
	 */
	@RequestMapping("intBankDwellmessage")
	@ResponseBody
	public List<IntBankDwellmessage> intBankDwellmessage(@RequestBody Map<String, String> map) {
		return intBankDataService.intBankDwellmessage(map);
	}

	/**
	 * 添加识别表记录
	 * 
	 * @param intBankLog
	 * @return
	 */
	@RequestMapping("insertIntBankLog")
	@ResponseBody
	public int insertIntBankLog(@RequestBody IntBankLog intBankLog) {
		return intBankDataService.insertIntBankLog(intBankLog);

	}

	@RequestMapping("saveIntBankQueryDetail")
	@ResponseBody
	public int saveIntBankQueryDetail(@RequestBody IntBankQueryDetail intBankQueryDetail) {
		return intBankDataService.saveIntBankQueryDetail(intBankQueryDetail);

	}

	@RequestMapping("deleteIntBankQueryDetail")
	@ResponseBody
	public int deleteIntBankQueryDetail(long id) {
		return intBankDataService.deleteIntBankQueryDetail(id);

	}

	/**
	 * 查询记录汇总
	 * 
	 * @param map
	 * @return
	 */
	@RequestMapping("intBankQuerySummary")
	@ResponseBody
	public List<IntBankQuerySummary> intBankQuerySummary(@RequestBody Map<String, String> map) {
		return intBankDataService.intBankQuerySummary(map);

	}
	
	@RequestMapping("selectAll")
	@ResponseBody
	public List<Map<String,Object>> selectAll(@RequestBody Map<String,String> msg){
		return intBankDataService.selectAll(msg);

	}
	
	@RequestMapping("selectByloanIdAndSerialNum")
	@ResponseBody
	public List<Map<String, Object>> selectByloanIdAndSerialNum(@RequestBody String loanId,String serialNum){
		return intBankDataService.selectByloanIdAndSerialNum(loanId,serialNum);

	}
	
	@RequestMapping("insertDataLog")
	@ResponseBody
	public int insertDataLog(@RequestBody IntDataQueryLog IntDataQueryLog){
		return intBankDataService.insertDataLog(IntDataQueryLog);

	}
	
	@RequestMapping("intDataQueryLogLoanId")
	@ResponseBody
	public List<IntDataQueryLog> intDataQueryLogLoanId(@RequestBody Map<String,String> msg){
		return intBankDataService.intDataQueryLogLoanId(msg);

	}
	
	/**
	 * 征信报告审核-获取报告pdf的全部数据
	 * @param map
	 * @return
	 */
	@RequestMapping("getMarvelsCreditReportData")
	@ResponseBody
	public IntBankBasiInfoCollection getMarvelsCreditReportData(@RequestBody Map<String, String> map) {
		IntBankBasiInfoCollection data = null;
		try {
			data = intBankDataService.getMarvelsCreditReportData(map);
		} catch (MarvelsBusinessException e) {
			MarvelsLogUtil.getInstance().error("approve征信报告审核-获取报告pdf数据异常 ：", e);
		}
		return data;
	}
	
	/**
	 * 征信报告审核-个人基本信息保存
	 * @param intBankBasic
	 * @return
	 */
	@RequestMapping("saveMarvelsIntBankBasic")
	@ResponseBody
	public IntBankBasic saveMarvelsIntBankBasic(@RequestBody IntBankBasic intBankBasic){
		IntBankBasic data = null;
		try {
			data = intBankDataService.saveMarvelsIntBankBasic(intBankBasic);
		} catch (MarvelsBusinessException e) {
			MarvelsLogUtil.getInstance().error("approve征信报告审核-个人基本信息保存异常 ：", e);
		}
		return data;
	}
	
	/**
	 * 征信报告审核-居住信息保存
	 * @param intBankDwellmessage
	 * @return
	 */
	@RequestMapping("saveMarvelsIntBankDwellmessage")
	@ResponseBody
	public IntBankDwellmessage saveMarvelsIntBankDwellmessage(@RequestBody IntBankDwellmessage intBankDwellmessage){
		IntBankDwellmessage data = null;
		try {
			data = intBankDataService.saveMarvelsIntBankDwellmessage(intBankDwellmessage);
		} catch (MarvelsBusinessException e) {
			MarvelsLogUtil.getInstance().error("approve征信报告审核-居住信息保存异常 ：", e);
		}
		return data;
	}
	
	@RequestMapping("saveMarvelsIntBankPositionmesage")
	@ResponseBody
	public IntBankPositionmesage saveMarvelsIntBankPositionmesage(@RequestBody IntBankPositionmesage intBankPositionmesage){
		IntBankPositionmesage data = null;
		try {
			data = intBankDataService.saveMarvelsIntBankPositionmesage(intBankPositionmesage);
		} catch (MarvelsBusinessException e) {
			MarvelsLogUtil.getInstance().error("approve征信报告审核-职业信息保存异常 ：", e);
		}
		return data;
	}
	
	@RequestMapping("saveMarvelsIntBankCredittips")
	@ResponseBody
	public IntBankCredittips saveMarvelsIntBankCredittips(@RequestBody IntBankCredittips intBankCredittips){
		IntBankCredittips data = null;
		try {
			data = intBankDataService.saveMarvelsIntBankCredittips(intBankCredittips);
		} catch (MarvelsBusinessException e) {
			MarvelsLogUtil.getInstance().error("approve征信报告审核-信用提示保存异常 ：", e);
		}
		return data;
	}
	
	@RequestMapping("saveMarvelsIntBankNotCredittips")
	@ResponseBody
	public IntBankNotCredittips saveMarvelsIntBankNotCredittips(@RequestBody IntBankNotCredittips intBankNotCredittips){
		IntBankNotCredittips data = null;
		try {
			data = intBankDataService.saveMarvelsIntBankNotCredittips(intBankNotCredittips);
		} catch (MarvelsBusinessException e) {
			MarvelsLogUtil.getInstance().error("approve征信报告审核-未结清贷款信息汇总保存异常 ：", e);
		}
		return data;
	}
	
	@RequestMapping("saveMarvelsIntBankNotPinshouseholds")
	@ResponseBody
	public IntBankNotPinshouseholds saveMarvelsIntBankNotPinshouseholds(@RequestBody IntBankNotPinshouseholds intBankNotPinshouseholds){
		IntBankNotPinshouseholds data = null;
		try {
			data = intBankDataService.saveMarvelsIntBankNotPinshouseholds(intBankNotPinshouseholds);
		} catch (MarvelsBusinessException e) {
			MarvelsLogUtil.getInstance().error("approve征信报告审核-保存未销户贷记卡信息汇总异常 ：", e);
		}
		return data;
	}
	
	@RequestMapping("saveMarvelsIntBankNotQuasiCredit")
	@ResponseBody
	public IntBankNotQuasiCredit saveMarvelsIntBankNotQuasiCredit(@RequestBody IntBankNotQuasiCredit intBankNotQuasiCredit){
		IntBankNotQuasiCredit data = null;
		try {
			data = intBankDataService.saveMarvelsIntBankNotQuasiCredit(intBankNotQuasiCredit);
		} catch (MarvelsBusinessException e) {
			MarvelsLogUtil.getInstance().error("approve征信报告审核-保存未销户准贷记卡信息异常 ：", e);
		}
		return data;
	}
	
	@RequestMapping("saveMarvelsIntBankGuaranteeCount")
	@ResponseBody
	public IntBankGuaranteeCount saveMarvelsIntBankGuaranteeCount(@RequestBody IntBankGuaranteeCount intBankGuaranteeCount){
		IntBankGuaranteeCount data = null;
		try {
			data = intBankDataService.saveMarvelsIntBankGuaranteeCount(intBankGuaranteeCount);
		} catch (MarvelsBusinessException e) {
			MarvelsLogUtil.getInstance().error("approve征信报告审核-对外贷款担保信息汇总保存异常 ：", e);
		}
		return data;
	}
	
	@RequestMapping("saveMarvelsIntBankCreditPaymentRecord")
	@ResponseBody
	public List<IntBankCreditPaymentRecords> saveMarvelsIntBankCreditPaymentRecord(@RequestBody IntBankCreditPaymentRecords intBankCreditPaymentRecord){
		List<IntBankCreditPaymentRecords> data = null;
		try {
			data = intBankDataService.saveMarvelsIntBankCreditPaymentRecord(intBankCreditPaymentRecord);
		} catch (MarvelsBusinessException e) {
			MarvelsLogUtil.getInstance().error("approve征信报告审核-贷款信息保存异常 ：", e);
		}
		return data;
	}
	
	@RequestMapping("updateIntBankCreditPaymentRecords")
	@ResponseBody
	public int updateIntBankCreditPaymentRecords(@RequestBody IntBankCreditPaymentRecords intBankCreditPaymentRecord){
		int data = 0;
		try {
			data = intBankDataService.updateIntBankCreditPaymentRecords(intBankCreditPaymentRecord);
		} catch (MarvelsBusinessException e) {
			MarvelsLogUtil.getInstance().error("approve征信报告审核-贷款信息保存异常 ：", e);
		}
		return data;
	}
	
	@RequestMapping("saveMarvelsCreditReport")
	@ResponseBody
	public MarvelsResultDTO saveMarvelsCreditReport(@RequestParam("loanId") String loanId){
		try {
			return intBankDataService.saveMarvelsCreditReport(loanId);
		} catch (MarvelsBusinessException e) {
			MarvelsLogUtil.getInstance().error("approve征信报告审核-提交时信息保存异常 ：", e);
			return MarvelsResultDTO.getResult(MarvelsErrorCode.ERROR.getValue(), MarvelsErrorCode.ERROR.getDesc(),
					e.getMessage());
		}
	}

	@RequestMapping("getCreditData")
	@ResponseBody
	public ZxDataRespDTO getCreditData(@RequestBody ZxDataReqDTO reqDto, String dataProvider){
		ZxDataRespDTO zxDataRespDTO = new ZxDataRespDTO();
		try {
			zxDataRespDTO = intBankDataService.getCreditData(reqDto,dataProvider);
		} catch (MarvelsBusinessException e) {
			MarvelsLogUtil.getInstance().error("查询征信列表数据异常："+reqDto.getLoanId(), e);
		}
		return zxDataRespDTO;
		
	}

	
	@RequestMapping("getDetailCreditData")
	@ResponseBody
	public ZxDataRespDTO getDetailCreditData(@RequestBody ZxDataReqDTO reqDto, String dataProvider){
		
		return intBankDataService.getDetailCreditData(reqDto,dataProvider);
		
	}
	
}
